-- CALC_SKY_FIGHTER_LUCK
-- 战队的幸运

return function(fighter)
    local luck = fighter.dbase:query("luck", 0);

    -- 幸运+N
    local prop = PropM.combine(fighter, "attrib2", "luck");
    luck = PropM.apply(prop, luck);

    luck = luck + SkyShipSkillM.calcAddon(fighter, "luck", luck);

    luck = luck + SkyPropM.calcAddon(fighter, "luck", luck);

    -- 幸运+N（不参与前面的整体提升）
    prop = PropM.combine(fighter, "add_attrib", "luck");
    luck = PropM.apply(prop, luck);

    -- 降低幸运N
    prop = PropM.combine(fighter, "ship_reduce_attrib", "luck");
    luck = PropM.apply(prop, luck);

    if luck < 0 then
        luck = 0;
    end

    return luck;
end
